<%template _header%>
<%namespace YouHP.Utility%>
<%namespace YouHP.Model%>

<!--TheCurrent start-->
<div id="foruminfo">
	
	<div class="userinfo">
		<h2><a href="{Config.WebsiteUrl}" class="home">{Config.WebsiteTitle}</a>
			  <span><a href="usercp.aspx">管理中心</a></span>
			  <strong>添加疾病</strong>
		</h2>
	</div>
	
	<div class="forumstats">
		<div id="search">
				<%template _quicksearch%>
		</div>
	</div>
	
</div>


<script type="text/javascript">
	function checkCheckBox(form,objtag)
	{
		if (typeof(objtag.checked) == "undefined")
		{
			objtag.checked = true;
		}
		for(var i = 0; i < form.elements.length; i++) 
		{
			var e = form.elements[i];
			if(e.name == "dszitemid") 
			{
				e.checked = objtag.checked;
			}
		}
		objtag.checked = !objtag.checked;
	}
</script>

<!--主体-->
<div class="controlpannel">
   <%template _admmenu%>
	<div class="pannelcontent">
		<div class="pcontent">
			<div class="panneldetail">
				<%template _admdsemenu%>	
				<div class="pannelbody">
					<div class="pannellist">
					<%if ErrorCount==0%>
					
						<%if IsPost%>
						
							<%template _msgbox%>
							
						<%else%>
						
						<p>所有疾病 {DszCount.ToString()}</p><br />
				  	<form id="dszform" name="dszform" method="post" action="">
						<table width="100%" border="0" cellspacing="0" cellpadding="0" ID="Table1">
						<%csharp%>
						int dindex = DszCount - ( PageIndex - 1) * PageSize;
						foreach(DiseaseInfo info in DszList){
						<%/csharp%>
							<tbody>
							<tr class="messagetable" onmouseover="this.className='messagetableon'" onmouseout="this.className='messagetable'">
							<td width="3%"><img src="/support/dnt/images/message_0.gif" alt="疾病"/></td>
							<td width="32">{dindex}</td>
							<td width="4%"><input name="dszitemid" id="id{info.Id}" type="checkbox" value="{info.Id}" style="margin-top:-1px;"/></td>
							<td width="32">{info.PinYin}</td>
							<td width="50%" style="text-align:left;"><a href="ListDiseases.aspx?dszid={info.Id}">{info.Name}</a> </td>
							<td>&nbsp;</td>
							<td width="80">
								<a href="#" target="_blank">{info.UpdateTime.ToString("yyyy-MM-dd")}</a></td>
							<td width="48">
							  <a href="#" onclick="$('id{info.Id}').checked=true;$('dszform').submit();">删除</a></td>
							<td width="48">
							  <a href="EditDisease.aspx?dszid={info.Id}">编辑</a></td>
							</tr>
							</tbody>
						<%csharp%>
						dindex--;
						}
						<%/csharp%>
						</table>
						</form>
						</div>
						
						<div class="pannelmessage">
							
									<div class="pannelleft" style="width: 160px;">
										<a href="#"  onclick="checkCheckBox($('dszform'),this)" class="selectall">全选</a>&nbsp;&nbsp;&nbsp;
										<a href="#" onclick="$('dszform').submit()" class="selectall">删除</a> 
									</div>
									
						</div>
						
						<div class="forumpages">
  							<div class="forumpagesnumbers">
							<table border="0" cellpadding="0" cellspacing="0" ID="Table2">
								<tr>
									<td class="forumallpages"><strong>{PageIndex}</strong>&nbsp;&nbsp;/&nbsp;&nbsp;{PageCount}&nbsp;&nbsp;页</td>
			            <td width="10">&nbsp;</td>
			            <td class="forumallpages">{PageNumbers}</td>
			            <td class="forumallpages3">跳转<input name="gopage" type="text" id="gopage" onKeyDown="if(event.keyCode==13) {
							          window.location='ViewDisease.aspx?page=' + this.value;}"  size="4" maxlength="9"  class="colorblue2"/>页</td>
								</tr>
							</table>
							</div>
						</div>
						<%/if%>
							
						</div>
						
					<%else%>
						<%template _memerrmsgbox%>
					<%/if%>
					
			  </div>
			</div>
		</div>
	</div>
</div>
<!--主体-->
</div>
<%template _copyright%>
<%template _footer%>
